library(plotly)
## Loading required package: ggplot2
## Registered S3 methods overwritten by 'tibble':
## method from
## format.tbl pillar
## print.tbl pillar
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(readr)
five_dd <- read_csv("C:/Users/011305/Documents/five_dd.csv", locale = locale(encoding = "BIG5"))
## Parsed with column specification:
## cols(
## 綁定時間 = col_datetime(format = ""),
## type = col_character(),
## csum = col_double(),
## csum_type = col_double()
## )
View(as.data.frame(table(five_dd$type)))
fig <- plot_ly(five_dd,
x = five_dd$綁定時間,
y=five_dd$csum_type,
type = "scatter",
mode="lines+marker",
color=~type)
fig <- fig %>%
layout(hovermode = "x unified")
fig
## Warning: `arrange_()` was deprecated in dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help